package main

import (
	"fmt"
	"math"
)

func sqrt(x float64) float64 {
	z := float64(3)
	for i := 0; i < 10; i++ {
		z = z - ((z*z - x) / 2 * z)
	}
	return z
}

func main() {
	x := float64(2)
	//for x := float64(1); x < 100; x++ {
	fmt.Println(x, sqrt(x), math.Sqrt(x))
	//}
}
